
import java.util.ArrayList;
import java.util.List;
public class BaggageCollectionImpl implements IBaggageCollection {
    private List list;

    public BaggageCollectionImpl() {
        this.list = new ArrayList();
    }

    public void add(Baggage baggage) {
        list.add(baggage);
    }

    public void remove(Baggage baggage) {
        list.remove(baggage);
    }

    public int size() {
        return list.size();
    }

    public IMyIterator<Baggage> iterator() {
        return new MyIteratorImpl<Baggage>(list);
    }
}